<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>任务</title>
    <link rel="stylesheet" href="/Public/css/gxxjkefu-normalize.css">
    <link rel="stylesheet" href="/Public/css/model.css">
    <link href="/Public/css/animate.css" rel="stylesheet">
    <link rel="stylesheet" href="/Public/css/toast.css">
    <link rel="stylesheet" type="text/css" href="/Public/css/xcConfirm.css"/>
    <link rel="stylesheet" href="/Public/css/zoomify.min.css">
    <style>
        .notice_info {
            padding: 30px 0 3%;
            color: #979797;
            float: left;
            width: 100%;
            background: #ffffff;
        }

        .input_info input {
            padding: 5px 10px;
            width: 40%;
        }

        .urgency_ul li {
            color: #333333;
            margin-bottom: 10px;
        }

        .clearfloat:after {
            display: block;
            clear: both;
            content: "";
            visibility: hidden;
            height: 0
        }

        .clearfloat {
            background: white;
            zoom: 1
        }

        .pageJump input {
            width: 45px;
            height: 25px;
        }

        .btn_div {
            border-radius: 5px;
            display: inline-block;
        }

        .btn_div input {
            border-radius: 5px;
        }

        .common_btn {
            border-radius: 5px;
            float: left;
            height: 30px;
            border: solid 1px #ececec;
            color: #5d5e60;
            background: none;
        }

        .info_ul {
            width: 80%;
            margin: 0 auto;
        }

        .info_ul li {
            border-radius: 10px;
            border-top: solid 1px #abdde6;
            border-bottom: solid 1px #abdde6;
            margin-bottom: 10px;
            padding: 15px 25px;
        }

        .info_ul .li_btn{
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .info_ul li:hover {
            background: #bde0e6;
            color: white;
        }

        .info_ul li .content_span {
            float: right;
        }
        .modal_ul{
            margin-bottom: 20px;
        }
        .modal_ul li{
            clear: both;
            padding: 10px 25px;
            color: black;
        }
        .modal_ul li div{
            display: inline-block;
            width: 80px;
        }
        .modal_ul li input{
            width: 70%;
            background: #efefef;
            border: 1px #cccccc solid;
            padding: 5px 10px;
            color: black;
        }
        .modal_ul li:hover{
            background: #abdde6;
            color: black;
        }
        .modal_ul .li_btn2{
            display: flex;
            justify-content: left;
            align-items: center;
        }
        img{
            height: 140px;
            width: 160px;
        }
        .pic_row{
            margin: 3px;
        }
    </style>
    <style>
        .task_info{
            padding: 4% 5% 15%;
            line-height: 35px;
            color: black;
            background: #ffffff;
        }

        .task_div{
            margin: 0 auto;
            border: solid 1px #ececec;
            border-left:solid 10px #ececec;
            padding: 2% 4% 2% 2%;
        }
        .task_div span{
            display: block;
        }
        .task_div .task_user span{
            display: inline-block;
        }
        textarea{
            background: #f5f5f5;
            border: none;
            padding: 1%;
        }
        .submit_btn{
            background-color: #49CFC4;
            width: 200px;
            height: 40px;
            border: none;
            color: white;
            background: #49CFC4;
            margin: 20px 0;
            position: absolute;
            right: 0;
            bottom: 0;
        }

        .check_btn{
            float: right;
            background-color: #abdde6;
            width: 100px;
            height: 32px;
            border: none;
            color: white;
            background: #abdde6;
            margin: 5px;
            right: 0;
            bottom: 0;
        }
        .comment_div{
            border-top: solid #f2f2f2 2px;
            padding: 20px 0;
            margin-top: 20px;
        }
        .task_div {

            height: 380px;
        }
        .back_btn {
            width: 61px;
            height: 30px;
            position: absolute;
            right: 80px;
            /*top: 30px;*/
            border: none;
            background: url("/Public/image/back_btn.jpg") no-repeat center;
        }
    </style>
    <script src="/Public/js/jquery-3.2.1.js"></script>
</head>
<body>
<div  class="scrollbar animated fadeInRight" id="style-1">
<div id="main_C"  >
    <div class="title_info">
        <span>任务</span>
    </div>
    <div class="white_bgColor task_info">
        <div class="task_div">
            <div class="task_user">
                <span>任务名称：用户<{$user_name}>工作认证审核</span>
                <input onclick="javascrtpt:window.history.back(-1);" type="button" class="back_btn" />
            </div>
            <span>任务时间：<{$data.task_time}></span>
            <span>提醒：<{$data.warn}></span>
            <if  condition="$data.status eq 1">
                <if condition="$data.over_date eq 1">
                    <span>提醒：任务已超时<{$data.day}>天<{$data.hour}>小时</span>
                    <else/>
                    <span>提醒：距离任务还有<{$data.day}>天<{$data.hour}>小时</span>
                </if>
            </if>
            <span>公司名称：<{$work_pic.work_company}></span>
            <span>渠道商：<{$channel}></span>
            <div style="margin-top: 20px">
               <if condition="$work_pic.img_one neq ''">
                   <div class="row pic_row" style="display: inline-block">
                       <div class="example col-xs-1 col-md-1">
                           <p><img src="<{$work_pic.img_one}>" class="img-rounded"/></p>
                       </div>
                   </div>
               </if>
                <if condition="$work_pic.img_two neq ''">
            <div class="row pic_row" style="display: inline-block">
                <div class="example col-xs-1 col-md-1">
                    <p><img src="<{$work_pic.img_two}>"  class="img-rounded"/></p>
                </div>
            </div>
                </if>
                <if condition="$work_pic.img_thr neq ''">
            <div class="row pic_row" style="display: inline-block">
                <div class="example col-xs-1 col-md-1">
                    <p><img src="<{$work_pic.img_thr}>"  class="img-rounded"/></p>
                </div>
            </div>
                </if>
            </div>
            <div>
            <input type="button" value="不通过" onclick="check(1)" class="check_btn"/>
            <!--<input type="button" value="通过" onclick="check(2)" class="check_btn"/>-->
            </div>
        </div>
        <div style="margin-top:30px;position: relative;padding-bottom: 80px">
            <p>备注</p>
            <textarea name="a"  id="content" style="width:98%;height:210px;"></textarea>
            <input type="button"value="提交" onclick="feedback()" class="submit_btn"/>
        </div>
        <p style="margin-top: 20px">历史备注：</p>
        <div id="feedback_list">
       <volist name="cert_mark" id="vo">
           <div class="comment_div">
               <span><{$vo.content}></span>
               <span style="float: right"><{$vo.ctime}>   记录人：<{$vo.name}> （0<{$vo.admin_id}>）</span>
           </div>
       </volist>
        </div>
    </div>
</div>
</div>
<script src="/Public/js/jquery-3.2.1.js"></script>
<script src="/Public/js/xcConfirm.js" type="text/javascript" charset="utf-8"></script>
<script src="/Public/laydate/laydate.js"></script>
<script src="/Public/js/toast.js"></script>
<script src="/Public/js/content.js?v=1.0.0"></script>
<script src="/Public/js/zoomify.min.js"></script>

<script>
    $('.example img').zoomify();
    var vid="<{$vid}>";
    var phone="<{$phone}>";
    //父窗口 用户信息
    var phone="<{$phone}>";
    window.parent.get_user(phone);

    function check(type) {

        if(type==1){//nopass
            var txt = "确认不通过?";
            var option = {
                title: "认证审核",
                btn: parseInt("0011", 2),
                onOk: function () {
                    var url="<{$SERVER_NAME}>/WorkCert/cert_result";
                    $.post(url, {
                        vid: vid,type:1
                    }, function (data) {
                        console.log('121212', data);
                        if (data.code == '1001') {//获取历史备注
                            $('#main_C').toast({
                                content: '提交成功！',
                                duration: 1000
                            });
                        } else {
                            window.wxc.xcConfirm(data.result, window.wxc.xcConfirm.typeEnum.success);
                        }
                    });

//                   var url = "<{$SERVER_NAME}>/AntiUser/call";
//                    $.post(url, {phone: phone}, function (data) {
//                        console.log('9999999999999',data);
//                        if (data.code = '1001') {
//                            var obj = data.result;
//                            if (obj.Succeed == true) {
//
//                            } else {
//                                window.wxc.xcConfirm(data.result, window.wxc.xcConfirm.typeEnum.success);
//                            }
//                        } else {
//                            window.wxc.xcConfirm(data.result, window.wxc.xcConfirm.typeEnum.success);
//                        }
//                    });
                }
            }

        }else if(type==2){//pass
            var txt = "确定通过?";
            var option = {
                title: "认证审核",
                btn: parseInt("0011", 2),
                onOk: function () {
                var url="<{$SERVER_NAME}>/WorkCert/cert_result";
                    $.post(url, {
                        vid: vid,type:2
                    }, function (data) {
                        console.log('121212', data);
                        if (data.code == '1001') {//获取历史备注
                            $('#main_C').toast({
                                content: '提交成功！',
                                duration: 1000
                            });

                            window.location.href="<{$SERVER_NAME}>/WorkCert/work_cert_list";

                        } else {
                            window.wxc.xcConfirm(data.result, window.wxc.xcConfirm.typeEnum.success);
                        }
                    });
                }
            }
        }
        window.wxc.xcConfirm(txt, "custom", option);

    }

   function feedback() {
       var url="<{$SERVER_NAME}>/Work_Cert/cert_mark";
       var content=$('#content').val();
       if(content=="" || content.replace(/(^s*)|(s*$)/g, "").length == 0){
           $('#main_C').toast({
               content: '请填写备注！',
               duration: 1000
           });
           return false;
       }
//
       var txt = "确定提交？";
       var option = {
           title: "任务提交",
           btn: parseInt("0011", 2),
           onOk: function () {

               $.post(url, {
                   vid: vid,
                   content: content
               }, function (data) {
                   console.log('121212', data);
                   if (data.code == '1001') {//获取历史备注

                       $('#main_C').toast({
                           content: '提交成功！',
                           duration: 1000
                       });
                       window.location.reload();
                   } else {
                       window.wxc.xcConfirm(data.result, window.wxc.xcConfirm.typeEnum.success);
                   }
               });
           }
       }
       window.wxc.xcConfirm(txt, "custom", option);
   }


</script>
</body>
</html>